<template>
    <div>
        <div>test</div>
        <button @click="goTodo">todo2</button>
        <router-view/>
    </div>
</template>

<script lang="ts">
import { computed, defineComponent } from 'vue';
import { useRoute, useRouter } from 'vue-router';

export default defineComponent({
    setup() {
        const router = useRouter();
        const goTodo = () => {
            router.push({
                name: 'todo2',
            });
        };
        return {
            goTodo,
        };
    },
});
</script>
